// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdReferenceList
 */
public class AdReferenceListDaoImpl
    extends org.tinaelle.server.domain.AdReferenceListDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdReferenceListDao#toAdReferenceListDTO(org.tinaelle.server.domain.AdReferenceList)
     */
    public org.tinaelle.common.dto.AdReferenceListDTO toAdReferenceListDTO(final org.tinaelle.server.domain.AdReferenceList entity)
    {
        return super.toAdReferenceListDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdReferenceList loadAdReferenceListFromAdReferenceListDTO(org.tinaelle.common.dto.AdReferenceListDTO adReferenceListDTO)
    {
        org.tinaelle.server.domain.AdReferenceList adReferenceList = this.load(adReferenceListDTO.getAdReferenceListId());
        if (adReferenceList == null)
        {
            adReferenceList = org.tinaelle.server.domain.AdReferenceList.Factory.newInstance();
        }
        return adReferenceList;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdReferenceListDao#adReferenceListDTOToEntity(org.tinaelle.common.dto.AdReferenceListDTO)
     */
    public org.tinaelle.server.domain.AdReferenceList adReferenceListDTOToEntity(org.tinaelle.common.dto.AdReferenceListDTO adReferenceListDTO)
    {
        org.tinaelle.server.domain.AdReferenceList entity = this.loadAdReferenceListFromAdReferenceListDTO(adReferenceListDTO);
        this.adReferenceListDTOToEntity(adReferenceListDTO, entity, true);
        return entity;
    }
}